Non-volatile memory (NVM) is a new type of byte-addressable memory-level storage device, e.g., phase change memory (PCM), spin-torque transfer RAM (STT-RAM), and resistive RAM (RRAM). The non-volatile memory has advantages such as low latency, huge bandwidth, non-volatility, and low power, with read and write performance close to that of conventional DRAM memory. In addition, the non-volatile memory provides durability same as an external storage of a conventional magnetic disk. Therefore, a memory-level persistent storage (also called “persistent memory”) built by using the non-volatile memory can provide data durability at the memory level, which does not require write-back of data to a magnetic disk and greatly improves performance of a storage system.
In the storage system, data consistency is one of important features ensuring correct and reliable running of the storage system. The data consistency requires that the storage system should be able to recover to a consistent state after an unexpected failure occurs. Transaction management is one of common manners of data consistency maintenance. Transaction management combines different data accesses in a same operation into a transaction, and maintains atomicity and durability of the transaction. The atomicity requires that data updates in the transaction should be all completed or failed. The durability requires that data updates in the transaction should not be lost after a power failure occurs in the system.
There is a great difference between maintenance of data consistency in the persistent memory and maintenance of data consistency in the conventional magnetic disk storage system. The conventional magnetic disk storage system maintains the read/write state and write-back order of the transaction data in the memory to ensure that data written back to the magnetic disk can be recovered to a consistent state, The persistent memory maintains the read/write state and the write-back order of the transaction data in a CPU cache to ensure that data written back to the persistent memory can be recovered to a consistent state. The maintenance on the data cache of the conventional magnetic disk storage system is managed by an operating system and can be implemented in software, while the data cache in persistent memory is managed by the CPU cache and is implemented in hardware, in the conventional software-based transaction management manner a lot of operations such as flushing (for example, clflush) and fencing (for example, mfence) need to he introduced in persistent memory, which greatly affects the CPU cache efficiency and further affects the overall performance of the system,
To reduce overheads of data consistency maintenance in, the persistent memory, some existing practices propose to implement functional expansion on the CPU cache hardware to support state tracking and guarantee the write-back order of the transaction data during the transaction processing. These practices include an epoch (epoch) mechanism proposed in a BPFS system by Microsoft Research, a strand consistency (strand consistency) mechanism proposed by University of Michigan, and a loose-ordering consistency (loose-ordering consistency) mechanism proposed by Tsinghua University. However, all these methods need to modify the CPU cache hardware.